Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK-2254-go-create-qr-code #288

Merged
merged 62 commits into from
Dec 14, 2023

Conversation

mehmet-yoti
Copy link
Contributor

No description provided.

@mehmet-yoti mehmet-yoti changed the title SDK-2254: updated tests SDK-2254-go-create-qr-code Oct 25, 2023
Copy link

@irotech irotech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please review the commit message with something in line with the goal you want to achieve and split unrelated changes in other commits (example class)?

if err != nil {
return fmt.Errorf("failed to initialise Share client :: %w", err)
}
//didClient.OverrideAPIURL("https://connect.public.stg1.dmz.yoti.com/share/")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do not expose internal resources in public repos

digitalidentity/create_qr_code_builder_test.go Outdated Show resolved Hide resolved
}
fmt.Println(string(b))

shareSession, err := didClient.CreateShareSession(sessionReq)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to split this in 2 commits
commit_a: create example for session creation
commit_b: add session QR creation to example (this commit should have the SDK-2254 in the name)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That example is just testing purposes and now we are removing from idv.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, what's this binary file for?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

executable in linux @irotech

@mehmet-yoti this and idv.exe should just be added to the .gitignore and delete-committed out of the repo?

digitalidentity/service.go Outdated Show resolved Hide resolved
digitalidentity/service_test.go Outdated Show resolved Hide resolved
@@ -80,3 +81,35 @@ func GetShareSession(httpClient requests.HttpClient, sessionID string, clientSdk
err = json.Unmarshal(responseBytes, shareSession)
return shareSession, err
}

// CreateQrCode using the supplied sessionID parameter
func CreateShareQrCode(httpClient requests.HttpClient, sessionID string, clientSdkId, apiUrl string, key *rsa.PrivateKey) (*QrCode, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's missing a request body https://lampkicking.atlassian.net/wiki/spaces/CON/pages/3756458012/Share+v2+Flows#QR-Code-Creation it looks like it accepts some extra fields:

POST /v2/sessions/:sessionId/qr-codes

{
  "transport": "",     // optional - default is 'QR_CODE'
  "displayMode": ""    // optional - default is 'INLINE'
}

no idea what the accepted values are or if we should give clients a list of possible values, it's not documented there or in the ticket

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java and Node SDK send empty JSON for this endpoint so the server-side defaults are used

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

umm ok, happy to be consistent with other sdks, just curious why it's even an option if we won't expose these options to the RP

digitalidentity/create_qr_code_builder.go Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
_examples/idv/handlers.session.go Outdated Show resolved Hide resolved
_examples/digitalidentity/digitalidentity Outdated Show resolved Hide resolved
digital_identity_client.go Outdated Show resolved Hide resolved
@klaidas
Copy link
Collaborator

klaidas commented Nov 2, 2023

just gotta remove a couple things above and should be good

@irotech
Copy link

irotech commented Nov 6, 2023

Could you please review the commit message with something in line with the goal you want to achieve and split unrelated changes in other commits (example class)?

I hope you're going to rebase and change these commit messages to follow the same format
SDK-1234: This commit addresses this feature and, not to be picky but, a commit message should give you a hint on what changes. A clean GIT log helps in identifying quickly which commit introduced a change that might break (for instance)

SDK-2254: updated tests
SDK-2254 Resolved pr comments
SDK-2254:updated pr changes
SDK-2254 removed unused builder

mehmet-yoti and others added 29 commits November 7, 2023 23:11
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
@mehmet-yoti mehmet-yoti merged commit bd35297 into SDK-2230-Expose-share-v2-api Dec 14, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants